home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 8
/
Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso
/
Aminet
/
mus
/
play
/
tracker_4_31.lzh
/
tracker
/
tools.c
< prev
Wrap
C/C++ Source or Header
|
1995-02-21
|
831b
|
44 lines
/* tools.c
vi:ts=3 sw=3:
*/
/* standard routines for use in tracker. Used to be in main.c
*/
/* $Id: tools.c,v 4.12 1995/02/21 21:13:16 espie Exp espie $
* $Log: tools.c,v $
* Revision 4.12 1995/02/21 21:13:16 espie
* Cleaned up source. Moved minor pieces of code around.
*
* Revision 4.11 1995/02/21 17:54:32 espie
* Internal problem: buggy RCS. Fixed logs.
*
*/
#include "defs.h"
#include "extern.h"
ID("$Id: tools.c,v 4.12 1995/02/21 21:13:16 espie Exp espie $")
/* v = read_env(name, default): read the scalar value v in the environment,
* supply default value.
*/
int read_env(name, def)
char *name;
int def;
{
char *var;
int value;
var = getenv(name);
if (!var)
return def;
if (sscanf(var, "%d", &value) == 1)
return value;
else
return def;
}